#pragma once

#include <string>
#include <map>
#include "IOCPAsynConnectionSocket.h"
#include "RecvDataPackage.h"
#include "IOCPConnectionPool.h"

class CDataProcessorCenter
{
public:
	CDataProcessorCenter(CIOCPConnectionPool* _pConnectionPool);
	~CDataProcessorCenter(void);

	bool SendData(const std::string &_strIP, int _nPort, char* _cArrBuffer, int _nLen);

	bool SendData(CIOCPAsynConnectionSocket* _pConnection,char* _cArrBuffer, int _nLen);

	bool RecvData(CIOCPAsynConnectionSocket* _pConnection, char* _cArrBuffer, int _nLen);

private:
	CIOCPConnectionPool* m_pConnectionPool;
	std::map<CIOCPAsynConnectionSocket*,CRecvDataPackage*> m_mapConnectionPackage;
};
